import { Card } from 'antd'

import { useLocation } from 'react-router-dom'
import { observer } from 'mobx-react-lite'
import SimpleDetails from '@/components/SimpleDetails'
import ExamPaper from '@/pages/Details/ExamPaper'


const Details = () => {
    const { pathname } = useLocation()
    const path = pathname.split("/")
    const api = path[path.length - 1]
    if(api === "exam_paper"){
        return (
            <div>
                <Card>
                    <ExamPaper />
                </Card>
            </div>
        )
    }else{
        return (
            <div>
                <Card>
                    <SimpleDetails />
                </Card>
            </div>
        )
    }
} 

export default observer(Details)